<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:form>

	<p:menu>
		<p:submenu label="Ajax Menuitems">
			<p:menuitem value="#{mensagem.cadastrar}" action="" icon="ui-icon-disk" />
			<p:menuitem value="#{mensagem.listar}" action="" icon="ui-icon-arrowrefresh-1-w" />
			<p:menuitem value="#{mensagem.editar}" action="" icon="ui-icon-arrowrefresh-1-w" />
			<p:menuitem value="#{mensagem.excluir}" action="" icon="ui-icon-arrowrefresh-1-w" />
		</p:submenu>
	</p:menu>

	<h3>Overlay</h3>
	<p:commandButton id="dynaButton" value="Show" type="button"
		icon="ui-icon-extlink" />
	<p:menu overlay="true" trigger="dynaButton" my="left top"
		at="left bottom">
		<p:submenu label="Ajax Menuitems">
			<p:menuitem value="Save" actionListener="#{menuView.save}"
				update="messages" icon="ui-icon-disk" />
			<p:menuitem value="Update" actionListener="#{menuView.update}"
				update="messages" icon="ui-icon-arrowrefresh-1-w" />
		</p:submenu>
		<p:submenu label="Non-Ajax Menuitem">
			<p:menuitem value="Delete" actionListener="#{menuView.delete}"
				update="messages" ajax="false" icon="ui-icon-close" />
		</p:submenu>
		<p:submenu label="Navigations">
			<p:menuitem value="External" url="http://www.primefaces.org"
				icon="ui-icon-home" />
			<p:menuitem value="Internal" outcome="/mobile/index"
				icon="ui-icon-star" />
		</p:submenu>
	</p:menu>

	<h3>Programmatic Menu</h3>
	<p:menu model="#{menuView.model}" />
</h:form>

</html>